<?php
$table=mysql_real_escape_string($table);
$q=$db->prepare("count * from $table");
$q->execute();
$rows=array();
$count=$q->rowCount();

/*
unset($cols);
unset($table);
unset($limit);
unset($q);
*/
?>